//
//  OCCHTTPManager.h
//  occ
//
//  Created by plocc on 14-4-18.
//  Copyright (c) 2014年 RS. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "JSONModelLib.h"
#import "AFNetworking.h"
#import "BaseResponse.h"

@interface BaseHTTPManager : NSObject

+ (BaseHTTPManager*) sharedManager;

+ (AFHTTPRequestOperation *)doTaskWithURL:(NSString*)url
                               parameters:(NSDictionary*)model
                                  success:(void (^)(BaseResponse* rsp))success
                                  failure:(void (^)( NSError *error))failure;

+ (AFHTTPRequestOperation *)doTaskWithURL:(NSString*)url
                               parameters:(NSDictionary*)model
                                   before:(void (^)(void))before
                                  success:(void (^)(BaseResponse* rsp))success
                                  failure:(void (^)( NSError *error))failure;

+ (AFHTTPRequestOperation *)doTaskWithURL:(NSString*)url
                               parameters:(NSDictionary*)model
                                 complete:(void (^)(NSError *error,BaseResponse* rsp))complete;

+ (AFHTTPRequestOperation *)doTaskWithURL:(NSString*)url
                               parameters:(NSDictionary*)model
                                   before:(void (^)(void))before
                                 complete:(void (^)(NSError *error, BaseResponse* rsp))complete;

@end
